home *** CD-ROM | disk | FTP | other *** search
- /* getpalettesize */
- #include <stdio.h>
- #include <conio.h>
- #include <graphics.h>
- main()
- {
- int graphdriver = DETECT,graphmode;
- /* Detect and initialize the graphics system */
- initgraph(&graphdriver,&graphmode,"c:\\turboc");
- /* Get the number of colors in the current palette */
- printf("Current palette has %d colors \n",
- getpalettesize());
- /* Wait for a keystroke before exiting */
- getch();
- closegraph();
- }